//package com.qf.proxy.test;
//
//import com.aspose.words.*;
//import com.aspose.words.Font;
//import lombok.SneakyThrows;
//
//import java.awt.*;
//import java.io.FileInputStream;
//import java.io.InputStream;
//
//
///**
// * @Author: gcr
// * @Date: 2023/11/22 11:15 （日期和时间）
// */
//public class AsposeWord2 {
//    @SneakyThrows
//    public static void main(String[] args) {
//
////        if (!getLicense()) {
////            return;
////        }
//        String path = "D:\\Users\\55419\\Desktop\\";
//        String fromPath = path + "dsasd.doc";
//        Document doc = new Document(fromPath);
////        Document doc = new Document();
//
//        //测试文字输出带格式的
//        DocumentBuilder builder = new DocumentBuilder(doc);
//        // 移动到特定位置进行写入开始 这里的书签是特定位置 如过上面内容累加下来也会自动下移
//        builder.moveToBookmark("测试");
//        //设置写日前字体大小
//        Font font = builder.getFont();
//
//        // 设置行间距
//        // 三种模式   Set a minimum amount of spacing 设置最小行间距
//        builder.getParagraphFormat().setLineSpacingRule(LineSpacingRule.AT_LEAST);
//        builder.getParagraphFormat().setLineSpacing(20.0);
//        builder.writeln("Minimum line spacing of 20.");
//        builder.writeln("Minimum line spacing of 20.");
//
//        //  Set exact spacing  设置精确间距
//        builder.getParagraphFormat().setLineSpacingRule(LineSpacingRule.EXACTLY);
//        builder.getParagraphFormat().setLineSpacing(9.0);
//        builder.writeln("Line spacing of exactly 5.");
//        builder.writeln("Line spacing of exactly 5.");
//
//        // 3 -  Set spacing as a multiple of default line spacing, which is 12 points by default.
//        // 将间距设置为默认行间距的倍数，默认为12点
//        // This kind of spacing will scale to different font sizes.
//        builder.getParagraphFormat().setLineSpacingRule(LineSpacingRule.MULTIPLE);
//        builder.getParagraphFormat().setLineSpacing(18.0);
//        builder.writeln("Line spacing of 1.5 default lines.");
//        builder.writeln("Line spacing of 1.5 default lines.");
//
//        // 字体大小
//        font.setSize(16);
//        // 字体名称
//        font.setName("仿宋");
//        // 颜色
//        font.setColor(Color.RED);
//        // 字间距 0 代表无间距
//        font.setSpacing(0);
//
//        builder.writeln("我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我我");
//
////// Specify font formatting for the hyperlink.
////        builder.getFont().setColor(Color.BLACK);
////        builder.getFont().setUnderline(Underline.DOUBLE);
////// Insert the link.
////        builder.writeln("Aspose Website");
////// Revert to default formatting.
////        builder.getFont().clearFormatting();
////        builder.getFont().setUnderline(Underline.length);
////// Insert the link.
////        builder.writeln("Aspose Website");
////// Revert to default formatting.
////        builder.getFont().clearFormatting();
////        builder.getFont().setUnderline(Underline.SINGLE);
////// Insert the link.
////        builder.writeln("Aspose Website");
////// Revert to default formatting.
////        builder.getFont().clearFormatting();
////        builder.getFont().setUnderline(Underline.DASH);
////// Insert the link.
////        builder.writeln("Aspose Website");
////// Revert to default formatting.
////        builder.getFont().clearFormatting();
////        builder.getFont().setUnderline(Underline.DASH_HEAVY);
////// Insert the link.
////        builder.writeln("Aspose Website");
////// Revert to default formatting.
////        builder.getFont().clearFormatting();
////        builder.getFont().setUnderline(Underline.DASH_LONG);
////// Insert the link.
////        builder.writeln("Aspose Website");
////// Revert to default formatting.
////        builder.getFont().clearFormatting();
////        builder.getFont().setUnderline(Underline.DASH_LONG_HEAVY);
////// Insert the link.
////        builder.writeln("Aspose Website");
////// Revert to default formatting.
////        builder.getFont().clearFormatting();
////        builder.getFont().setUnderline(Underline.WAVY_HEAVY);
////// Insert the link.
////        builder.writeln("Aspose Website");
////// Revert to default formatting.
////        builder.getFont().clearFormatting();
////        builder.writeln(" for more information.");
//        long l = System.currentTimeMillis();
//
//        doc.save(path + l + ".doc");
//    }
//
//    public static boolean getLicense() {
//        boolean result = false;
//        try {
//            ClassLoader loader = Thread.currentThread().getContextClassLoader();
//            InputStream license = new FileInputStream("F:\\qfworkspace\\idea\\novelty_jinan\\src\\main\\resources\\license.xml");// 凭证文件
//            License aposeLic = new License();
//            aposeLic.setLicense(license);
//            result = true;
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        return result;
//    }
//}
